package 集合类;

import java.util.ArrayList;
import java.util.List;

public class MyList {
    public static void main(String[] args) {

    }
    public static void main2(String[] args) {
        List<String> arraylist = new ArrayList<>();
        List<String> arraylist2 = new ArrayList<>();
        arraylist.add("Dog");
        arraylist.add("Pig");
        arraylist.add("Tiger");
        arraylist2.addAll(arraylist);
        arraylist.remove("Dog");

        for(String Animal : arraylist){
            System.out.println(Animal);
        }
        for(String Animal : arraylist2){
            System.out.println(Animal);
        }

    }
}
